<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>登录</title>
    <link rel="icon" href="">
    <script type="text/javascript" src="/web/static/quote/jquery.min.js"></script>
    {#    <script type="text/javascript">
        $(function () {

            $("#username").addClass('easyui-textbox');
            $("#username").attr("data-options", "iconCls:'icon-man',iconWidth:30,iconAlign:'left'");


        })

    </script>#}
    <link rel="stylesheet" type="text/css" href="/web/static/quote/easyui/easyui.css">
    <link rel="stylesheet" type="text/css" href="/web/static/quote/easyui/icon.css">
    <link rel="stylesheet" type="text/css" href="/web/static/quote/easyui/demo.css">
    <script type="text/javascript" src="/web/static/quote/easyui/jquery.easyui.min.js"></script>


    <style>
        html, body {
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
        }

        h1 {
            color: rgb(128, 128, 128);
            text-align: center;
        }

        a:link, a:hover, a:visited, a:active {
            color: rgb(128, 128, 128);
            text-decoration: none;
        }

        form {
            width: 400px;
            min-width: 400px;
            position: absolute;
            left: 40%;
            top: 15%;
            margin: 0;
            padding: 30px;
            background-color: white;
            border: 2px solid rgba(128, 128, 128, 0.2);
            border-radius: 10px;
        }

        form div {
            margin-bottom: 10px;
        }

        #username, #password {
            width: 100%;
            height: 35px;
        }

        #submit {
            width: 100%;
            height: 35px;
        }
    </style>

</head>
<body>
<form action="" method="post">
    {% macro render_field(field) %} <!-- 定义字段宏 -->
        <dt>{{ field.label }}:
        <dd>{{ field(**kwargs)|safe }}
            {% if field.errors %}
                <ul class=errors>
                    {% for error in field.errors %}
                        <li>{{ error }}</li>
                    {% endfor %}
                </ul>
            {% endif %}
        </dd>
    {% endmacro %}
    <div>
        <h1>用户登录</h1>
    </div>
    <div>
        {{ form.username }}
        {#
            <input class="easyui-textbox" data-options="iconCls:'icon-man',iconWidth:30,iconAlign:'left',prompt:'用户名'" style="width:100%;height:35px;" />
#}
    </div>
    <div>
        {{ form.password }}
        {#
            <input class="easyui-passwordbox" data-options="iconWidth:30,iconAlign:'left',prompt:'密码'" style="width:100%;height:35px;" />
#}
    </div>
    <div>
        {{ form.csrf_token }}

        {% if emsg %}  <!-- 如果有错误信息 则显示 -->
            <h3> {{ emsg }}</h3>
        {% endif %}
        {#
        <input class="easyui-checkbox" label="记住密码" labelPosition="after" labelWidth="70"/>
#}
    </div>
    <div>
        {{ form.submit }}
        {#
        <input class="easyui-linkbutton" type="submit" value="登陆" style="width:100%;height:35px;"/>
#}
    </div>
    {# <div>
            <div style="display:inline;">
                <a href="javascript:void(0)">还未注册？</a>
            </div>
            <div style="display:inline;margin-left:170px;">
                <a href="javascript:void(0)">忘记密码？</a>
            </div>
        </div>#}
</form>


</body>
</html>